<div class="campaignsDetail" ui-view="container">

    <ol class="breadcrumb">
        <li>广告中心</li>
        <li><a ui-sref="campaigns" class="tittle-color">广告投放</a></li>
        <li>广告计划详情</li>
    </ol>

    <div class="clearfix mt-10">
        <label class="title">
            <label>A</label>
            <span>{{title.advShortName}}</span>
        </label>
        <label class="title">
            <label>C</label>
            <span>{{title.campaignName}}</span>
        </label>
        <label class="title" ng-if="adCampaignVO.adStyle !== 0">
            <label>G</label>
            <span>{{title.adStyleName}}</span>
        </label>
    </div>

    <form class="form-horizontal" name="mainForm" novalidate>
        <section class="fg-section">
            <h5>基本设置</h5>

            <div class="form-group" style="overflow: hidden;">
                <label class="col-sm-2 control-label">广告主：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" >{{title.advShortName}}</p>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">广告推广计划名称：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" >{{title.campaignName}}</p>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">广告形式：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" >{{title.adStyleName}}</p>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">行业类型：</label>
                <div class="col-sm-8">
                    <p class="form-control-static">{{adCampaignVO.tradeType !== 0 ? codeTable[adCampaignVO.tradeType] : ""}}</p>
                </div>
            </div>
        </section>

        <section class="fg-section">
            <h5>时间和预期</h5>

            <div class="form-group">
                <label class="col-sm-2 control-label">广告排期：</label>
                <div class="col-sm-8">
                    <div class="" ng-hide="planEdit">
                        <div class="table-responsive">
                            <table class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>开始时间</th>
                                    <th>结束时间</th>
                                    <th>排期</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr ng-repeat="item in adCampaignVO.scheduleDaysView">
                                    <td>{{item[0]}}</td>
                                    <td>{{item[1]}}</td>
                                    <td>{{item[2]}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">每日时段：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" style="width: 90px;float: left" ng-repeat="item in adCampaignVO.intervalHourArray">
                        {{item}}
                    </p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">预算计价单位：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-if="adCampaignVO.costType !== 0">{{codeTable[adCampaignVO.costType]}}<span ng-hide="adCampaignVO.costType == 11">(共<span class="txt-color-r">{{adCampaignVO.costType == "12" ? adCampaignVO.cpmNum : adCampaignVO.costType == "13" ? adCampaignVO.cpcNum : ""}}</span>)</span></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">预算使用策略：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-if="adCampaignVO.costStrategy !== 0">{{codeTable[adCampaignVO.costStrategy]}}<small>{{adCampaignVO.costStrategy == "20" ? "（每日投放预算无上限）" : "（每日投放预算平均使用）"}}</small></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">付费类型：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-if="adCampaignVO.payType !== 0">{{adCampaignVO.payType == "30" ? adCampaignVO.memo : codeTable[adCampaignVO.payType]}}</p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">广告权重：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-if="adCampaignVO.weight !== 0">{{adCampaignVO.weight}}</p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">广告频次：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-if="adCampaignVO.frequency !== 0">{{adCampaignVO.frequency + '次/'+ codeTable[adCampaignVO.frequencyTime]}}</p>
                </div>
            </div>
        </section>

        <section class="fg-section">
            <h5>销售和合约</h5>

            <div class="form-group">
                <label class="col-sm-2 control-label">广告销售：</label>
                <div class="col-sm-8">
                    <p class="form-control-static">{{adCampaignVO.salesmen}}</p>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">广告销售单价：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-if="adCampaignVO.unitPrice !== 0">{{adCampaignVO.unitPrice}}元</p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">广告合约：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-show="adCampaignVO.contractId == 0">未关联</p>
                    <p class="form-control-static" ng-show="adCampaignVO.contractId > 0">{{adCampaignVO.contractId}}</p>
                </div>
            </div>
           <!-- <div class="form-group">
                <label class="col-sm-2 control-label">
                    <a ui-sref="campaigns.promotionGroup.detail">新建广告推广组</a>
                </label>
            </div>-->
        </section>

        <div class="text-center">
            <button type="button" class="btn btn-primary" ui-sref="campaigns.campaignsUpdate({campaignsId:adCampaignVO.campaignId})">修改</button>
            <button type="button" class="btn ims-btn" ui-sref="campaigns">取消</button>
        </div>

    </form>
</div>